
#include<stdio.h>

void my_get_charMum(char* p,int i,int a,int b,int c,int d,int e)
{
	for (int j = 0;j <i;j++)
	{
		if (*(p + j) >= 'a' && *(p + j) <= 'z')
			a++;
		else if (*(p + j) >= 'A' && *(p + j) <= 'Z')
			b++;
		else if (*(p + j) >= '0' && *(p + j) <= '9')
			c++;
		else if (*(p + j) == ' ')
			d++;
		else
			e++;
	}
	printf("%d %d %d %d %d", a, b, c, d, e);
}


int main()
{
	int a = 0, b = 0, c = 0, d = 0, e = 0;
	char arr[50] = { 0 };
	gets(arr);
	int i = 0;
	for (; arr[i] != '\0';)
		i++;
	my_get_charMum(arr,i,a,b,c,d,e);
	return 0;
}
